package cnic.ai.nacos.config

import org.quartz.Job
import org.quartz.JobExecutionContext
import org.springframework.stereotype.Component

class QuartzJob: Job {

    override fun execute(p0: JobExecutionContext?) {
        //var jobDetail = p0?.jobDetail
        var trigger = p0?.trigger

        var name = trigger?.key
        //var ppc: NacosDiscoveryClient = jobDetail?.jobDataMap?.get("client") as NacosDiscoveryClient
        var currentTime: Long = System.currentTimeMillis()/1000
        println("======QuertzJob=====${currentTime}===================")
        println("定时任务QuertzJob ----${name}--- ${currentTime}}")

        //ppc?.hello("QuertzJob-$currentTime")
    }
}